home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 June / PCpro_2006_06.ISO / files / freeware / openvip.exe / {app} / sdk / include / openvip / IImageSaver.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-02-01  |  7.7 KB  |  191 lines

  1. /*
  2.  * Generated by upf-idl C++ backend (upf ABI version: 2)
  3.  * Do not edit by hand!
  4.  */
  5.  
  6. #ifndef _UPF_IDL_OPENVIP_IIMAGESAVER_IDL_H_
  7. #define _UPF_IDL_OPENVIP_IIMAGESAVER_IDL_H_
  8.  
  9. #include <upf/cxx.h>
  10.  
  11. #if UPF_ABI_VERSION != 2
  12. #error "Headers generated for upf ABI different from the one you have installed, please regenerate them."
  13. #endif
  14.  
  15.  
  16. #include "openvip/defs.h"
  17. #include <upf/coretypes.h>
  18. #include <upf/IObject.h>
  19. #include <openvip/IDataFragment.h>
  20. #include <openvip/IVideoFrame.h>
  21. namespace openvip 
  22. {
  23.     class IImageSaver : virtual public ::upf::IObject
  24.     {
  25.     public:
  26.     
  27.         virtual bool SaveImage(IVideoFrame* img, const ::std::string& filename) = 0;
  28.     };
  29. }
  30. #include <upf/cxx_ptr.h>
  31. namespace upf {
  32. inline void __upf_dispatch__openvip_IImageSaver_SaveImage(::openvip::IImageSaver *_upf_data, upf_Arguments *_upf_marchalled_args)
  33. {
  34.     upf::Arguments _upf_args(_upf_marchalled_args);
  35.     ::upf::Ptr< ::openvip::IVideoFrame > img;
  36.     ::std::string filename;
  37.     _upf_args.seek0();
  38.     _upf_args >> img;
  39.     _upf_args >> filename;
  40.     bool _upf_retval(_upf_data->SaveImage(img, filename));
  41.     _upf_args.seek0();
  42.     _upf_args << _upf_retval;
  43.     _upf_args.seek0();
  44. }
  45.  
  46.  
  47. template<> struct InterfaceTraits< ::openvip::IImageSaver >
  48. {
  49.     typedef ::openvip::IImageSaver value_type;
  50.  
  51.     static void _UPF_CALLING_CONVENTION dispatchFunction(void *obj, upf_MethodID method, upf_Arguments *args)
  52.     {
  53.         ::openvip::IImageSaver *ptr = static_cast< ::openvip::IImageSaver* >(obj);
  54.         if (method < (0 + __UPF_UPF_IOBJECT_OPCNT))
  55.         {
  56.             InterfaceTraits< ::upf::IObject >::dispatchFunction(static_cast< ::upf::IObject* >(ptr),
  57.                                                          method - (0), args);
  58.         }
  59.         else 
  60.         {
  61.             static void (*functions[])(::openvip::IImageSaver *, upf_Arguments *) = {
  62.             __upf_dispatch__openvip_IImageSaver_SaveImage,
  63.             NULL };
  64.             functions[method - (0 + __UPF_UPF_IOBJECT_OPCNT)](ptr, args);
  65.         }
  66.     }
  67.  
  68.     static const char* implName()
  69.         { return "openvip.ImageSaver"; }
  70.  
  71.     static const char* name()
  72.         { return "openvip.IImageSaver"; }
  73.  
  74.     static const IID& iid()
  75.     {
  76.         static IID _iid = {0x28604acd,0x599f36a5,0x93f608c3,0xfa4d62b0,1,0};
  77.         return _iid;
  78.     }
  79.     
  80.     static const upf_uint8_t *typereg()
  81.     {
  82.         static const upf_uint8_t desc[] = { 
  83. 0,0,0,130,0,0,19,111,112,101,110,118,105,112,46,73,73,109,97,103,
  84. 101,83,97,118,101,114,40,96,74,205,89,159,54,165,147,246,8,195,250,77,
  85. 98,176,0,1,0,0,0,1,0,11,117,112,102,46,73,79,98,106,101,99,
  86. 116,0,1,0,9,83,97,118,101,73,109,97,103,101,0,7,98,111,111,108,
  87. 101,97,110,0,2,0,19,111,112,101,110,118,105,112,46,73,86,105,100,101,
  88. 111,70,114,97,109,101,0,3,105,109,103,1,0,0,6,115,116,114,105,110,
  89. 103,0,8,102,105,108,101,110,97,109,101,1,0,1,0,0,0,155,0,0,
  90. 11,117,112,102,46,73,79,98,106,101,99,116,129,91,66,15,214,207,225,124,
  91. 112,91,189,235,231,44,230,242,0,1,0,0,0,0,0,4,0,6,105,110,
  92. 99,82,101,102,0,4,118,111,105,100,0,0,0,6,100,101,99,82,101,102,
  93. 0,4,118,111,105,100,0,0,0,14,113,117,101,114,121,73,110,116,101,114,
  94. 102,97,99,101,0,16,117,112,102,46,73,110,116,101,114,102,97,99,101,80,
  95. 116,114,0,1,0,7,117,112,102,46,73,73,68,0,12,105,110,116,101,114,
  96. 102,97,99,101,95,105,100,1,0,0,10,103,101,116,67,108,97,115,115,73,
  97. 68,0,7,117,112,102,46,67,73,68,0,0,0,0,0,0,10,2,0,7,
  98. 117,112,102,46,73,73,68,0,0,0,19,2,0,16,117,112,102,46,73,110,
  99. 116,101,114,102,97,99,101,80,116,114,0,0,0,26,1,0,7,117,112,102,
  100. 46,67,73,68,2,0,13,117,110,115,105,103,110,101,100,32,108,111,110,103,
  101. 0,0,2,48,0,0,19,111,112,101,110,118,105,112,46,73,86,105,100,101,
  102. 111,70,114,97,109,101,124,132,38,40,49,117,66,138,85,67,36,99,98,101,
  103. 216,67,0,1,0,0,0,1,0,21,111,112,101,110,118,105,112,46,73,68,
  104. 97,116,97,70,114,97,103,109,101,110,116,0,11,0,6,67,114,101,97,116,
  105. 101,0,4,118,111,105,100,0,3,0,13,117,110,115,105,103,110,101,100,32,
  106. 108,111,110,103,0,5,119,105,100,116,104,1,0,0,13,117,110,115,105,103,
  107. 110,101,100,32,108,111,110,103,0,6,104,101,105,103,104,116,1,0,0,19,
  108. 111,112,101,110,118,105,112,46,86,105,100,101,111,70,111,114,109,97,116,0,
  109. 6,102,111,114,109,97,116,1,0,0,8,71,101,116,87,105,100,116,104,0,
  110. 13,117,110,115,105,103,110,101,100,32,108,111,110,103,0,0,0,9,71,101,
  111. 116,72,101,105,103,104,116,0,13,117,110,115,105,103,110,101,100,32,108,111,
  112. 110,103,0,0,0,10,71,101,116,70,111,114,109,97,116,115,0,19,111,112,
  113. 101,110,118,105,112,46,86,105,100,101,111,70,111,114,109,97,116,0,0,0,
  114. 7,71,101,116,68,97,116,97,0,18,111,112,101,110,118,105,112,46,80,105,
  115. 120,101,108,66,117,102,82,79,0,1,0,19,111,112,101,110,118,105,112,46,
  116. 86,105,100,101,111,70,111,114,109,97,116,0,6,102,111,114,109,97,116,1,
  117. 0,0,8,71,101,116,87,68,97,116,97,0,18,111,112,101,110,118,105,112,
  118. 46,80,105,120,101,108,66,117,102,82,87,0,1,0,19,111,112,101,110,118,
  119. 105,112,46,86,105,100,101,111,70,111,114,109,97,116,0,6,102,111,114,109,
  120. 97,116,1,0,0,4,76,111,99,107,0,4,118,111,105,100,0,0,0,6,
  121. 85,110,108,111,99,107,0,4,118,111,105,100,0,0,0,8,73,115,76,111,
  122. 99,107,101,100,0,7,98,111,111,108,101,97,110,0,0,0,8,71,101,116,
  123. 87,67,111,112,121,0,19,111,112,101,110,118,105,112,46,73,86,105,100,101,
  124. 111,70,114,97,109,101,0,1,0,19,111,112,101,110,118,105,112,46,86,105,
  125. 100,101,111,70,111,114,109,97,116,0,6,102,111,114,109,97,116,1,0,0,
  126. 8,77,97,107,101,67,111,112,121,0,19,111,112,101,110,118,105,112,46,73,
  127. 86,105,100,101,111,70,114,97,109,101,0,1,0,19,111,112,101,110,118,105,
  128. 112,46,86,105,100,101,111,70,111,114,109,97,116,0,6,102,111,114,109,97,
  129. 116,1,0,0,0,0,0,62,0,0,21,111,112,101,110,118,105,112,46,73,
  130. 68,97,116,97,70,114,97,103,109,101,110,116,176,174,237,235,90,202,68,174,
  131. 144,162,3,200,168,195,7,36,0,1,0,0,0,1,0,11,117,112,102,46,
  132. 73,79,98,106,101,99,116,0,0,0,0,0,0,38,1,0,19,111,112,101,
  133. 110,118,105,112,46,86,105,100,101,111,70,111,114,109,97,116,2,0,13,117,
  134. 110,115,105,103,110,101,100,32,108,111,110,103,0,0,0,21,2,0,18,111,
  135. 112,101,110,118,105,112,46,80,105,120,101,108,66,117,102,82,79,0,0,0,
  136. 21,2,0,18,111,112,101,110,118,105,112,46,80,105,120,101,108,66,117,102,
  137. 82,87,0,0,0,0 };
  138.         return desc;
  139.     }
  140.  
  141.     static bool query(value_type *instance, MultiPurposeHookArgs *data)
  142.     {
  143.         if (data->mode == _UPF_HOOK_MODE_QUERY_INTERFACE)
  144.         {
  145.             if (upf::checkIID(*(data->u.qi.iid), iid()))
  146.             {
  147.                 data->u.qi.retval.data = instance;
  148.                 data->u.qi.retval.function = dispatchFunction;
  149.                 return true;
  150.             }
  151.         }
  152.         else if (data->mode == _UPF_HOOK_MODE_INIT_CLASSINFO)
  153.         {
  154.             upf_middleware->funcs.merge_typeinfo(typereg());
  155.             data->u.ici.ciWrapper->addInterface(iid());
  156.         }
  157.        if (InterfaceTraits< ::upf::IObject >::query(instance, data)) return true;
  158.         return false;
  159.     }
  160. };
  161.  
  162. template<class Base, int Offset>
  163. class _ProxyCode_OPENVIP_IIMAGESAVER : public _ProxyCode_UPF_IOBJECT< Base, 0 >
  164. {
  165.     virtual bool SaveImage(::openvip::IVideoFrame* img, const ::std::string& filename)
  166.     {
  167.         ArgumentsOwned _upf_args;
  168.         _upf_args << img;
  169.         _upf_args << filename;
  170.         m_dispatch.function(m_dispatch.data, Offset+0+0+__UPF_UPF_IOBJECT_OPCNT, _upf_args.getMarchalled());
  171.         bool _upf_retval;
  172.         _upf_args >> _upf_retval;
  173.         return _upf_retval;
  174.     }
  175. };
  176. #define __UPF_OPENVIP_IIMAGESAVER_OPCNT ((0+__UPF_UPF_IOBJECT_OPCNT)+(1))
  177. template<> class Proxy< ::openvip::IImageSaver > : 
  178.     public _ProxyCode_OPENVIP_IIMAGESAVER< _ProxyBase< ::openvip::IImageSaver >, 0 >
  179. {
  180. public:
  181.     Proxy(upf_Object *object, const upf_InterfaceData& dispatch)
  182.     {
  183.         init_proxy(object, dispatch);
  184.     }
  185.     virtual ~Proxy() {}
  186. };
  187.  
  188. } // namespace upf
  189.  
  190. #endif
  191.